<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">


    <link rel="stylesheet" href="pintuer.css">

    <link rel="stylesheet" href="AAATable.css">
    <!--<script data-main="dimensions" type="text/javascript" ></script>-->
    <script type="text/javascript" src="./iscroll.js"></script>
    <script src="./File.js"></script>

    <style>
        body{
            margin: 10px;
        }
    </style>


    <script type="text/javascript">

        var myScroll;

        function loaded () {
            myScroll = new IScroll('.wrapper', {
                mouseWheel: true ,
                scrollX: true,
                freeScroll: true,
                scrollbars: true,
            });
        }

//        document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

    </script>

</head>
<body onload="loaded();" >

<div class="wrapper">
    <div class="scroller">
        <ul>
            <li>Pretty row 1</li>
            <li>Pretty row 2</li>
            <li>Pretty row 3</li>
            <li>Pretty row 4</li>
            <li>Pretty row 5</li>
            <li>Pretty row 6</li>
            <li>Pretty row 7</li>
            <li>Pretty row 8</li>
            <li>Pretty row 9</li>
            <li>Pretty row 10</li>
            <li>Pretty row 11</li>
            <li>Pretty row 12</li>
            <li>Pretty row 13</li>
            <li>Pretty row 14</li>
            <li>Pretty row 15</li>
            <li>Pretty row 16</li>
            <li>Pretty row 17</li>
            <li>Pretty row 18</li>
            <li>Pretty row 19</li>
            <li>Pretty row 20</li>
            <li>Pretty row 21</li>
            <li>Pretty row 22</li>
            <li>Pretty row 23</li>
            <li>Pretty row 24</li>
            <li>Pretty row 25</li>
            <li>Pretty row 26</li>
            <li>Pretty row 27</li>
            <li>Pretty row 28</li>
            <li>Pretty row 29</li>
            <li>Pretty row 30</li>
            <li>Pretty row 31</li>
            <li>Pretty row 32</li>
            <li>Pretty row 33</li>
            <li>Pretty row 34</li>
            <li>Pretty row 35</li>
            <li>Pretty row 36</li>
            <li>Pretty row 37</li>
            <li>Pretty row 38</li>
            <li>Pretty row 39</li>
            <li>Pretty row 40</li>
            <li>Pretty row 41</li>
            <li>Pretty row 42</li>
            <li>Pretty row 43</li>
            <li>Pretty row 44</li>
            <li>Pretty row 45</li>
            <li>Pretty row 46</li>
            <li>Pretty row 47</li>
            <li>Pretty row 48</li>
            <li>Pretty row 49</li>
            <li>Pretty row 50</li>
        </ul>
    </div>
</div>



<div style="width: 100%;">

    <!--表格1-->
    <div class="AAATable" id="table1">
    <div class="divTableMain">
        <table>
            <tbody>
            <!--第一列-->
            <tr><td >单元31</td><td>单元34</td></tr>
            <script>
                var lineNum =10;
                for (var i=0;i<lineNum ; i++){
                    document.write(" <tr><td >单元31</td><td>单元34</td></tr>");
                }
            </script>
            <tr><td >单元31</td><td>单元34</td></tr>
            </tbody>
        </table>

    </div>

</div>

<br>
<br>
<br>

</div>



<br>
<br>
<!--表格2-->
<div class="AAATable" id="table2" style="width:100%;">

    <div class="divTableMain">
        <table>
            <tbody>
            <script>
                var colNum = 30;
                var lineNum = 50;

                for (var i=0;i<lineNum ; i++){
                    document.write("<tr>");
                    for (var j=0; j<colNum ; j++){
                        if (i==3 && j==0){
                            document.write("<td>很长很长很长<br>很高</td>");
                        }else if (i==5 && j==3){
                            document.write("<td nowrap='nowrap'>很长很长很长");
                        }
                        else {
                            document.write("<td>行:"+i +"列:"+j +"</td>");
                        }

                    }
                    document.write("</tr>");
//                    document.write("<tr><td>行:"+i+"</td><td>单元22</td><td>单元23</td><td>单元24</td></tr>");
                }

            </script>
            </tbody>
        </table>

    </div>

</div>




</body>



<script>
    console.log("开始");

    AAATable.debug = true;
    AAATable.IScroll = IScroll;

    var at = new AAATable();
    at.setupTable(document.getElementById("table1"));
    at.fixedHeader = true;
    at.width100= true;
    at.tableStyle = "table table-bordered ";
    at.buildTable();

    var atable2 = new AAATable();
    atable2.setupTable(document.getElementById("table2"));
    atable2.fixedHeader = true;
    atable2.fixedCol = true;
    atable2.offsetW = 1;
    atable2.tableStyle = "table table-bordered";
    atable2.buildTable();

</script>



</html>
